/*
 * Basket.cpp
 *
 *  Created on: 2020年12月12日
 *      Author: san
 */

#include "Basket.h"

double print_total(std::ostream &os, const Quote &item, size_t n);
double Basket::total_receipt(std::ostream &os) const
{
	double amount = 0.0;
	for (auto item: items)
	{
		amount += print_total(os, *item, items.count(item));
	}

	os << "Total Sale: " << amount << std::endl;  // 打印最终的总价格
}

